workspaceManager.get_active_workspace_index();
}
- _activeWorkspaceChanged(_wm, _from, _to, _direction) {
- if (this._gestureActive)
- return;
-
- this._scrollToActive();
- }
-
- _scrollToActive() {
- let workspaceManager = global.workspace_manager;
- let active = workspaceManager.get_active_workspace_index();
-
- this._updateScrollAdjustment(active);
- }
-
- _updateScrollAdjustment(index) {
+ _activeWorkspaceChanged(_wm, _from, to, _direction) {
if (this._gestureActive)
return;
- this._scrollAdjustment.ease(index, {
+ this._scrollAdjustment.ease(to, {
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
duration: WORKSPACE_SWITCH_TIME,
});